<template>
  <div class="c-wrapper l-flex--row">
    <template v-if="value">
    <svg-icon :icon-class="'risk_' + value" style="width:20px"></svg-icon
    ><span class="value">{{ value }}级</span></template>
    <template v-else>暂无数据</template>
  </div>
</template>

<script>
export default {
  name: "signal",
  props: {
    value: {
      type: String,
      default: "A",
    },
  },
  data() {
    return {};
  },
  computed: {
    level() {
      return {
        A: 0,
        B: 1,
        C: 2,
        D: 3,
        E: 4,
      }[this.value || "A"];
    },
  },
  methods: {},
};
</script>
<style lang="scss" scoped>
.c-wrapper {
  height: 16px;
  display: flex;
  align-items: center;
  .value {
    font-size: 14px;
    margin-left: 8px;
  }
}
</style>
